
class Person(object):

    def __init__(self):
        self.name = "haha"
        self._age = 15
        self.__weight = 60

    def getWeight(self):
        return self.__weight

class Chinese(Person):

    def getAge(self):
        return self._age

    def getName(self):
        return self.name

a = Person()
print(a.name)
print(a._age)
# print(a.__weight) 报错
print(a.getWeight())
b = Chinese()
print(b.getName())
print(b.getAge())
print(b._age)
# print(b.__weight) 报错
print(b.getWeight())
